package com.gitee.xhs.broadcastState;

import com.gitee.xhs.sourceIterator.RateLimitedIterator;
import org.apache.flink.streaming.api.functions.source.FromIteratorFunction;

import static com.gitee.xhs.enums.OnTimeEnum.*;
import static com.gitee.xhs.enums.RegularEnum.*;
import static com.gitee.xhs.sampleRecod.transactionRecord.jmockTool.TransactionLoopOneToFiveMockerInterceptor.LOOP_KEY_FIVE;


/**
 * @author BigHead
 * @date 2022/7/6 17:06
 * @description BroadcastStateSource
 */
public class BroadcastStateSource extends FromIteratorFunction<BroadcastStateDao> {

    public BroadcastStateSource() {
        super(
                new RateLimitedIterator<>(
                        new BroadcastStateDaoIterator(LOOP_KEY_FIVE),
                        LOOP_KEY_FIVE,
                        MINUTE,
                        1,
                        REGULAR
                )
        );
    }

}
